home *** CD-ROM | disk | FTP | other *** search
- <WIZSET QueryFieldList = ''>
- <WIZSET FieldCount = '0'>
- <WIZLOOP index="CurrentField" list="$${DetailFields}">
- <WIZSET FieldCount = FieldCount + 1>
- <!---- field is in format 'sTable.sField=sType;nSize;bRequired' ---->
- <WIZSET SeparatorPos = Find( CurrentField, '=' )>
- <WIZSET TableFieldName = Left( CurrentField, SeparatorPos - 1 )>
- <WIZSET QueryFieldList = QueryFieldList & TableFieldName & ' AS DetailField' & FieldCount & ', '>
- </WIZLOOP>
- <WIZSET QueryFieldList = Left( QueryFieldList, Len(QueryFieldList) - 2 )>
-
-
- <WIZSET QueryTableList = ''>
- <WIZLOOP index="i" list="$${Tables}">
- <WIZSET QueryTableList = QueryTableList & i & ', '>
- </WIZLOOP>
- <WIZSET QueryTableList = Left( QueryTableList, Len(QueryTableList) - 2 )>
-
-
- <WIZSET QueryConditionList = ''>
- <WIZLOOP index="i" list="$${Joins}">
- <WIZSET QueryConditionList = QueryConditionList & i & ' AND '>
- </WIZLOOP>
-
- <!---- unique identifier field is in format 'sTable.sField=sType;nSize;bRequired' ---->
- <WIZSET Separator2Pos = Find( UniqueIdentifier, '=' )>
- <WIZSET Separator3Pos = Find( UniqueIdentifier, ';' )>
- <WIZSET TableFieldName = Left( UniqueIdentifier, Separator2Pos - 1 )>
- <WIZSET FieldType = Mid( UniqueIdentifier, Separator2Pos + 1, Separator3Pos - Separator2Pos - 1 )>
- <WIZIF FieldType EQ 'CHAR' OR FieldType EQ 'MEMO'>
- <WIZSET QueryConditionList = QueryConditionList & TableFieldName & " = '#URL.ID#'">
- <WIZELSE>
- <WIZSET QueryConditionList = QueryConditionList & TableFieldName & " = #URL.ID#">
- </WIZIF>
-
-
- <!--- Query returning detail information for selected item --->
- <CFQUERY name="Detail" dataSource="$${DataSource}">
- SELECT $${QueryFieldList}
- FROM $${QueryTableList}
- WHERE $${QueryConditionList}
- </CFQUERY>
-
-
- <HTML><HEAD>
- <TITLE>$${ApplicationName} - Detail</TITLE>
- </HEAD><BODY bgcolor="ffffff">
-
-
- <FONT size="+1">$${ApplicationName}</FONT> <BR>
- <FONT size="+2"><B>Detail</B></FONT>
-
- <P>
-
- <TABLE>
-
- <CFOUTPUT query="Detail">
-
- <WIZSET CurrentRow = 0>
- <WIZLOOP index="i" list="$${DetailFields}">
- <WIZSET CurrentRow = CurrentRow + 1
- ><WIZSET Separator1Pos = Find( i, '.' )
- ><WIZSET Separator2Pos = Find( i, '=' )
- ><WIZSET FieldName = Mid( i, Separator1Pos + 1, Separator2Pos - Separator1Pos - 1 )
- ><TR>
- <TD valign=top><B>$${FieldName}:</B></TD>
- <TD valign=top>#DetailField$${CurrentRow}#</TD>
- </TR>
- </WIZLOOP>
-
- <TR><TD colspan=$${FieldCount}><HR></TD></TR>
- </CFOUTPUT>
-
- </TABLE>
-
-
- </BODY></HTML>